<template>
  <div>

    user 组件

    <!-- {{ msg }} -->
    {{ userMsg }}---{{ counterMsg }}
  </div>
</template>

<script setup>

// 1 引入 
import { useUserStore } from '../../store/user'
import { useCounterStore } from '../../store/counter'
// 2  调用

import { storeToRefs } from 'pinia'
const userStore = useUserStore()

const counterStore = useCounterStore()

const { msg: userMsg, count: userCount } = storeToRefs(userStore)
const { msg: counterMsg, count: counterCount } = storeToRefs(counterStore)




</script>

<style lang="scss" scoped></style>